<template>
<view class="queryResult">
    <view class="title"><label>低保户基本信息</label></view>
    <div class="card_info">
        <view>
            <view class="li" v-if="masterana.CLASS1">保障类型：{{masterver.CLASS1}}</view>
            <view class="li" v-if="masterana.LM_NAME">户主姓名：{{masterver.LM_NAME}}</view>
            <view class="li" v-if="masterana.CLASS2">救助类别：{{masterver.CLASS2}}</view>
            <view class="li" v-if="masterana.LM_RS">保障人口：{{masterver.LM_RS}}</view>
            <view class="li" v-if="masterana.MONEY_WAGE">测算就业收入：{{masterana.MONEY_WAGE}}元/月</view>
            <view class="li" v-if="masterana.MONEY_MANAGER">测算经营性收入：{{masterana.MONEY_MANAGER}}元/月</view>
            <view class="li" v-if="masterana.MONEY_PROPERTY">测算财产性收入：{{masterana.MONEY_PROPERTY}}元/月</view>
            <view class="li" v-if="masterana.MONEY_TRANSFER">测算转移性收入：{{masterana.MONEY_TRANSFER}}元/月</view>
            <view class="li" v-if="masterana.COST_PREMIUM">测算保险费收入：{{masterana.COST_PREMIUM}}元/月</view>
            <view class="li" v-if="masterana.AMOUNT_INCOME">家庭总收入：{{masterana.AMOUNT_INCOME}}元/月</view>
            <view class="li" v-if="masterana.MONEY_SUPPORT">测算赡养费：{{masterana.MONEY_SUPPORT}}元/月</view>
            <view class="li" v-if="masterana.COST_TEACH">测算教育支出：{{masterana.COST_TEACH}}元/月</view>
            <view class="li" v-if="masterana.COST_NURSING">测算护理支出：{{masterana.COST_NURSING}}元/月</view>
            <view class="li" v-if="masterana.COST_CARE">测算照管支出：{{masterana.COST_CARE}}元/月</view>
            <view class="li" v-if="masterana.COST_MEDICAL">测算医疗费支出：{{masterana.COST_MEDICAL}}元/月</view>
            <view class="li" v-if="masterana.COST_OTHER">测算其它支出：{{masterana.COST_OTHER}}元/月</view>
            <view class="li red">保障金额：{{masterana.AMOUNT_MONEY}}元/月</view>
        </view>
    </div>
    <view class="title">
        <label>审批进度</label>
        <p>当前状况：<span :class="{ 'no': masterver.STEPSTATE == '不同意'}">{{masterver.STEPSTATE}}</span></p>
    </view>
    <uni-steps :options="list" :active="active" class="steps" direction="column"/>
</view>
</template>

<script>
import uniSteps from '@/components/uni-steps/uni-steps.vue'
export default {
    components: {
        uniSteps
    },
    data() {
        return {
            active: -1,
            masterver: {},
            masterana: {},
            list: [{
                title: '村/社区',
                desc:''
            }, {
                title: '乡镇/街道',
                desc:''
            }, {
                title: '民政局',
                desc:''
            }],
        }
    },
    onLoad(options) {
        this.masterver = JSON.parse(decodeURIComponent(options.data)).masterver
        if (this.masterver.STEP2_DATE) {
            this.list[0].desc = this.masterver.STEP2_DATE+'  '+this.masterver.STEP2_MES
            this.active = 0
        }
        if (this.masterver.STEP3_DATE) {
            this.list[1].desc = this.masterver.STEP3_MES
            this.list[0].desc = this.masterver.STEP3_DATE+'  '+this.masterver.STEP3_MES
            this.active = 1
        }
        if (this.masterver.STEP4_DATE) {
            this.list[2].desc = this.masterver.STEP4_MES
            this.list[0].desc = this.masterver.STEP4_DATE+'  '+this.masterver.STEP4_MES
            this.active = 2
        }
        // if (this.masterver.STEP2_DATE && this.masterver.STEP3_DATE && this.masterver.STEP4_DATE) {
        //     this.active = 3
        // }
        // if (this.masterver.STEPSTATE == '不同意') {
        //     this.list[3].title = '不同意'
        // }
        this.masterana = JSON.parse(decodeURIComponent(options.data)).masterana
    },
    methods: {}
  }
</script>

<style lang="scss" scoped>
.queryResult{
    .title{
        font-size: 32upx;
        color: #101010;
        height: 94upx;
        line-height: 94upx;
        width: 100%;
        padding:0 20upx;
        box-sizing: border-box;
        background-color: #F0EEEE;
        position: relative;
        overflow: hidden;
        p{
            font-size: 28upx;
            color: #6D6E71;
            float: right;
            span.no{
                color: #E51C23;
            }
        }
    }
    // .steps{padding: 20upx;}
    .uni-steps-items.uni-steps-column .uni-steps-item-circle-container {
        top: -5px
    }
    .card_info{
        font-size: 26upx;
        color: #101010;
        padding: 28upx;
        position: relative;
        display: flex;
        justify-content: space-between;
        .li{
            display: inline-block;
            width: 50%;
            line-height: 60upx;
            &.red{
                color: #E51C23;
            }
        }
        .user_pic{
            width: 129upx;
            height: 128upx;
        }
    }
}
</style>